import { useState } from 'react'
import { Outlet, Link } from "react-router-dom";
import { Button } from "antd"

function App() {
  const [count, setCount] = useState(0)

  const toHome=()=>{
    console.log('234')
  }

  return (
    <div className="App">
      顶层组件App
      <Button size={"small"} onClick={toHome}><Link to="/home">首页</Link></Button>
      <Button size={"small"}><Link to="/about">关于</Link></Button>
      {/*占位组件*/}
      <Outlet></Outlet>
    </div>
  )
}

export default App
